$(document).ready(init);

function init(){
	
}

function showMessageForm (receiver){
	$('[id="msgForm:receiver"]').val(receiver)
	$('#sendMessageForm').css("z-index","5");
	$('#screen').css("z-index","3");
	
}
function hideMessageForm (){
	$('#sendMessageForm').css("z-index","-2");
	$('[id="msgForm:receiver"]').val('');
	$('[id="msgForm:msgText"]').val('');
	$('#screen').css("z-index","-2");
}

function read(text,index){
$('#readMsgForm').css('visibility','visible');
$('#readMsgForm').css("z-index","5");
$('#contextField').val(text);
$('#screen').css("z-index","3");
$('#screen').css("background-color","rgba(255,255,255,.8)");
//$('#msgFormTitle').val('<b>Message from '+sender);
Window.index=index;
}
function closeMsgContent(){
	$('[id="tabForm:msgDataTable:'+Window.index+':markAsReadLink"]').click();	
	$('#readMsgForm').css('visibility','hidden');
	$('#readMsgForm').css("z-index","-2");
	$('#screen').css("z-index","-2");
	$('#screen').css("background-color","rgba(0,0,0,.08)");
}